import { getBasicData } from '@/api/declare' // 客户数据字典
export default {
    data () {
        return {
            invtTypeList: [], // 清单类型下拉选项
            listTypeList: [] // 流转类型下拉选项
        }
    },
    mounted () {
        this.queryInvtTypeList()
        this.queryListTypeList()
    },
    methods: {
        // 获取清单类型
        queryInvtTypeList () {
            getBasicData({
                dataMainType: 'INVT_TYPE',
                pageNum: 1,
                pageSize: 10000
            }).then(res => {
                if (res.data.code === '0000') {
                    this.invtTypeList = res.data.data.list.map(item => {
                        return {
                            value: item.dataCode,
                            label: item.dataName
                        }
                    })
                }
            })
        },
        // 获取流转类型
        queryListTypeList () {
            getBasicData({
                dataMainType: 'LIST_TYPE',
                pageNum: 1,
                pageSize: 10000
            }).then(res => {
                if (res.data.code === '0000') {
                    this.listTypeList = res.data.data.list.map(item => {
                        return {
                            value: item.dataCode,
                            label: item.dataName
                        }
                    })
                }
            })
        }
    }
}
